import pandas as pd

# 教师模型数据
teacher_data = [
    [1, 1.5897, 0.5082],
    [2, 0.26995, 0.9118],
    [3, 0.16938, 0.9483],
    [4, 0.13528, 0.9593],
    [5, 0.1184, 0.9639],
    [6, 0.081307, 0.9810],
    [7, 0.073402, 0.9814],
    [8, 0.060262, 0.9855],
    [9, 0.02126, 0.9942],
    [10, 0.02895, 0.9920],
    [11, 0.014085, 0.9953],
    [12, 0.013542, 0.9957],
    [13, 0.012144, 0.9967],
    [14, 0.013055, 0.9972],
    [15, 0.013542, 0.9967],
    [16, 0.012562, 0.9974],
    [17, 0.012287, 0.9972],
    [18, 0.013055, 0.9972],
    [19, 0.00588, 0.9993],
    [20, 0.012562, 0.9974]
]

# 学生模型（有老师）
student_with_teacher_data = [
    [1, 90.075, 0.4022],
    [2, 0.79687, 0.9596],
    [3, 0.14372, 0.9723],
    [4, 0.084808, 0.9799],
    [5, 0.060262, 0.9855],
    [6, 0.047065, 0.9861],
    [7, 0.040262, 0.9872],
    [8, 0.031946, 0.9868],
    [9, 0.02126, 0.9942],
    [10, 0.02895, 0.9920],
    [11, 0.014085, 0.9953],
    [12, 0.013542, 0.9957],
    [13, 0.012144, 0.9967],
    [14, 0.013055, 0.9972],
    [15, 0.013542, 0.9967],
    [16, 0.012562, 0.9974],
    [17, 0.012287, 0.9972],
    [18, 0.013055, 0.9972],
    [19, 0.00588, 0.9993],
    [20, 0.012562, 0.9974]
]

# 学生模型（无老师）
student_without_teacher_data = [
    [1, 101.73, 0.5130],
    [2, 0.79687, 0.9596],
    [3, 0.14372, 0.9723],
    [4, 0.084808, 0.9799],
    [5, 0.060262, 0.9855],
    [6, 0.047065, 0.9861],
    [7, 0.040262, 0.9872],
    [8, 0.031946, 0.9868],
    [9, 0.02126, 0.9942],
    [10, 0.02895, 0.9920],
    [11, 0.014085, 0.9953],
    [12, 0.013542, 0.9957],
    [13, 0.012144, 0.9967],
    [14, 0.013055, 0.9972],
    [15, 0.013542, 0.9967],
    [16, 0.012562, 0.9974],
    [17, 0.012287, 0.9972],
    [18, 0.013055, 0.9972],
    [19, 0.00588, 0.9993],
    [20, 0.012562, 0.9974]
]

# 创建 DataFrame
df_teacher = pd.DataFrame(teacher_data, columns=["Epoch", "Loss", "Acc@1"])
df_student_with_teacher = pd.DataFrame(student_with_teacher_data, columns=["Epoch", "Loss", "Acc@1"])
df_student_without_teacher = pd.DataFrame(student_without_teacher_data, columns=["Epoch", "Loss", "Acc@1"])

# 写入 Excel
with pd.ExcelWriter("excel_out/model_comparison.xlsx") as writer:
    df_teacher.to_excel(writer, sheet_name="Teacher", index=False)
    df_student_with_teacher.to_excel(writer, sheet_name="Student_With_Teacher", index=False)
    df_student_without_teacher.to_excel(writer, sheet_name="Student_Without_Teacher", index=False)

print("Excel 文件已生成：model_comparison.xlsx")